#!/bin/sh

ffroot()
{
	if [ $(id -u) != "0" ]; then
	echo "Error: You must be root to run this script, please use root to install"
	exit 1
	fi
}

ffpath()
{
	PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/root/fastcow
	export PATH
	export PACKAGESITE=http://mirrors.dashu.me/freebsd/releases/amd64/9.1-RELEASE/packages/Latest/
	echo 'export PACKAGESITE=http://mirrors.dashu.me/freebsd/releases/amd64/9.1-RELEASE/packages/Latest/' >> /etc/profile
	echo 'export PACKAGESITE=http://mirrors.dashu.me/freebsd/releases/amd64/9.1-RELEASE/packages/Latest/' >> /root/.profile
}

ffshow()
{
	clear
	echo "============================================="
	echo "    Fastcow version $fcversion, By Larry     "
	echo "============================================="
	echo "                        (__)                 "
	echo "                        (oo)                 "
	echo "                 /-------\/                  "
	echo "                / |     ||                   "
	echo "               *  ||----||                   "
	echo "                  ^^    ^^                   "
	echo "============================================="
	sleep 3
	clear
}

ffroot && ffpath && ffshow 
